package com.taxi.service;

import com.taxi.mapper.DriverUserMapper;
import com.taxi.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: aniu
 * @Date: 2023/10/6
 * @ClassName: CityDriverUserService
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@Service
public class CityDriverUserService {

    @Autowired
    private DriverUserMapper driverUserMapper;

    public Result<Boolean> isAvailableDriver(String cityCode){
        Integer integer = driverUserMapper.selectDriverUserCountByCityCode(cityCode);
        if(integer>0){
            return Result.ok(true);
        }else {
            return Result.ok(false);
        }
    }
}
